﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Xml.Serialization;

namespace SilverCrmSoap.FetchXml
{
    
    [DebuggerStepThrough]
    [XmlType(AnonymousType = true)]
    [XmlRoot(Namespace = "", IsNullable = false)]
    public class Entity
    {
        public Entity()
        {
            if (Attributes==null) Attributes=new List<object>();
            if (LinkEntities==null) LinkEntities=new List<LinkEntity>();
            if (Order==null) Order=new List<Order>();
        }

        [XmlElement("all-attributes", typeof (AllAttributes))]
        [XmlElement("attribute", typeof (Attribute))]
        public List<Object> Attributes;

        [XmlElement("filter", typeof (Filter))]
        public Filter Filter;

        [XmlElement("link-entity", typeof (LinkEntity))]
        public List<LinkEntity> LinkEntities;

        [XmlElement("order", typeof (Order))]
        public List<Order> Order { get; set; }
        
        [XmlAttribute("name")]
        public string Name { get; set; }
    }
}